﻿using System.Collections.Generic;
using System.Linq;
using JE.MicroMVVM.Example.Common;
using MicroMVVM;
using System.Runtime.Serialization;

namespace JE.MicroMVVM.Example.DataModels
{
    [DataContract(Name = "DataModelThree")]
    public partial class DataModelThree : BindableBase
    {
        private string _title;

        [DataMember(Name = "Title")]
        public string Title
        {
            get { return _title; }
            set { SetProperty(ref _title, value); }
        }
    }

    public partial class DataModelThree : IDesigntimeData<DataModelThree>
    {
        public DataModelThree GetDataModel()
        {
            return new DataModelThree()
                       {
                           Title = "This is a sample title for DataModelThree"
                       };
        }
    }

    public partial class DataModelThree : IDesigntimeData<IList<DataModelThree>>
    {
        IList<DataModelThree> IDesigntimeData<IList<DataModelThree>>.GetDataModel()
        {
            return Enumerable.Range(1, 10).Select(x => new DataModelThree()
            {
                Title = string.Format("Test {0}", x)
            }).ToList();
        }
    }
}